- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
🎨 publish port events to frontend #6396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎨 publish port events to frontend #6396
Conversation
          Codecov ReportAttention: Patch coverage is  
 Additional details and impacted files@@            Coverage Diff            @@
##           master   #6396      +/-   ##
=========================================
+ Coverage    84.5%   86.5%    +1.9%     
=========================================
  Files          10    1244    +1234     
  Lines         214   54568   +54354     
  Branches       25     870     +845     
=========================================
+ Hits          181   47240   +47059     
- Misses         23    7210    +7187     
- Partials       10     118     +108     
 Flags with carried forward coverage won't be shown. Click here to find out more. 
  | 
    
…ange-notifications
…ange-notifications
…ange-notifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx, left some suggests to consider
        
          
                packages/models-library/src/models_library/api_schemas_dynamic_sidecar/ports.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/simcore-sdk/src/simcore_sdk/node_ports_v2/nodeports_v2.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/notifications/__init__.py
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few comments. Good luck with it ! see you later!
        
          
                packages/models-library/src/models_library/api_schemas_dynamic_sidecar/ports.py
          
            Show resolved
            Hide resolved
        
              
          
                services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/core/application.py
          
            Show resolved
            Hide resolved
        
              
          
                ...ic-sidecar/src/simcore_service_dynamic_sidecar/modules/notifications/_notifications_ports.py
          
            Show resolved
            Hide resolved
        
              
          
                services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/long_running_tasks.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/nodeports.py
          
            Show resolved
            Hide resolved
        
              
          
                services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/nodeports.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/nodeports.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
      …ange-notifications
…K/osparc-simcore-forked into pr-osparc-port-change-notifications
          
 | 
    
Co-authored-by: Andrei Neagu <[email protected]>
Co-authored-by: Andrei Neagu <[email protected]>



What do these changes do?
To provide better feedback for users in the UI we are adding notifications for ports during the runtime of the platform. Notifications are send from the backend for each individual port. Even when all ports are required to download/upload notifications are sent one port at a time.
The only notifications that make sense are:
inputport when itdownloadsdata (we never upload data form an input port)outputport when ituploadsdata (outputs are downloaded and they have a progress bar when the service starts)Input ports
Notification message for each
inputportdownload:42["stateInputPorts",{"project_id":"b4a03e00-7691-11ef-a0a5-0242ac14001a","node_id":"81e4a4d9-e8f8-4816-ad22-58ce586f46e5","port_key":"input_20","status":"DOWNLOAD_FINISHED_SUCCESSFULLY"}].It can have one of the following
statusstates:Output ports
Notification message for each
outputportupload:42["stateOutputPorts",{"project_id":"b4a03e00-7691-11ef-a0a5-0242ac14001a","node_id":"81e4a4d9-e8f8-4816-ad22-58ce586f46e5","port_key":"output_2","status":"UPLOAD_STARTED"}].It can have one of the following
statusstates:Related issue/s
How to test
Dev-ops checklist